import { FormSchema } from '@/components/Table';
import { scoreTypeOption } from '@/views/comment/sys/help/dict';

/**
 * form配置
 */
export const schemas: FormSchema[] = [
  {
    field: 'id',
    component: 'Input',
    label: 'ID',
    colProps: {
      span: 20,
    },
    componentProps: {
      disabled: true,
    },
    ifShow: false,
  },
  {
    field: 'dataId',
    component: 'Input',
    label: '数据id',
    colProps: {
      span: 20,
    },
    componentProps: {
      disabled: true,
    },
    ifShow: false,
  },
  {
    field: 'uid',
    component: 'Input',
    label: '用户id',
    colProps: {
      span: 20,
    },
    ifShow: false,
  },
  {
    field: 'type',
    component: 'Select',
    label: '评分来源',
    colProps: {
      span: 20,
    },
    componentProps: {
      options: scoreTypeOption,
      disabled: true,
    },
    defaultValue: 2,
  },
  {
    field: 'score',
    component: 'Rate',
    label: '评分',
    colProps: {
      span: 20,
    },
  },
  {
    field: 'context',
    component: 'InputTextArea',
    label: '评论内容',
    colProps: {
      span: 20,
    },
  },
];
